cmake_minimum_required(VERSION 3.0)
project(MyCLibrary)

# 设置 C 标准
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

# 自动收集所有 .c 文件
file(GLOB SOURCES 
    "LL1/src/*.c"
    "OPG/src/*.c"
    "LR0/src/*.c")

# 生成静态库
add_library(parsing STATIC ${SOURCES})

# 头文件搜索路径
target_include_directories(parsing PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/LL1/include
    ${CMAKE_CURRENT_SOURCE_DIR}/OPG/include
    ${CMAKE_CURRENT_SOURCE_DIR}/LR0/include
    ${CMAKE_CURRENT_SOURCE_DIR}/../stl/include
)
# 添加其他库的路径和名称
find_library(OTHER_LIB libstl HINTS ${CMAKE_CURRENT_SOURCE_DIR}/../stl/build)
message(${OTHER_LIB})
target_link_libraries(parsing PUBLIC ${OTHER_LIB})
